import req from './http.js';

/**
 * 预约直播
 * @param {any} params
 */
const bookLive = (params = {}) =>
  req(
    'get',
    `${_Global.api.zx}/zxapi/secret_live/v1/book_live`,
    Object.assign(params, {
      _: Date.now(),
    })
  );
// 直播列表，更多
const livePage = (params = {}) =>
  req(
    'get',
    `${_Global.api.zx}/zxapi/secret_live/video_live/v1/page`,
    Object.assign(params, {
      _: Date.now(),
    })
  );
// 直播标签
const liveTabs = (params = {}) =>
  req(
    'get',
    `${_Global.api.zx}/zxapi/secret_live/label_live/v1/list`,
    Object.assign(params, {
      _: Date.now(),
    })
  );
// 图文直播Tab
const wordLiveInfo = (params = {}) =>
  req(
    'get',
    `${_Global.api.zx}/zxapi/secret_live/v1/text_live_info`,
    Object.assign(params, {
      _: Date.now(),
    })
  );
// 图文直播列表
const wordLiveList = (params = {}) =>
  req(
    'get',
    `${_Global.api.zx}/zxapi/secret_live/text_live/v1/page`,
    Object.assign(params, {
      _: Date.now(),
    })
  );
// 日刊
const getHotNews = (params = {}) =>
  req(
    'get',
    `${_Global.api.zx}/zxapi/cpmj/v1/journals`,
    Object.assign(params, {
      _: Date.now(),
    })
  );
// 课程列表
const courseList = (params = {}) =>
  req(
    'get',
    `${_Global.api.zx}/zxapi/cpmj/v1/courses`,
    Object.assign(params, {
      _: Date.now(),
    })
  );
// 直播列表,首页
const liveBanner = (params = {}) =>
  req(
    'get',
    `${_Global.api.zx}/zxapi/secret_live/video_live/v1/list`,
    Object.assign(params, {
      _: Date.now(),
    })
  );
/**
 * 取系列课程列表
 * @param {any} params
 */
const getSeqList = (params = {}) =>
  req(
    'get',
    `${_Global.api.zx}/zxapi/cpmj/v1/course_detail`,
    Object.assign(params, {
      _: Date.now(),
    })
  );
/**
 * 赠送课程列表
 * @param {any} params
 */
const getGiveList = (params = {}) =>
  req(
    'get',
    `${_Global.api.zx}/zxapi/cpmj/v1/basic_courses`,
    Object.assign(params, {
      _: Date.now(),
    })
  );

export default {
  getHotNews,
  bookLive,
  livePage,
  liveTabs,
  wordLiveInfo,
  wordLiveList,
  courseList,
  liveBanner,
  getSeqList,
  getGiveList,
};
